﻿using FastSocket.Server.Protocol;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SocketTool.Com.UDP.Server
{
    public class UDPServerProtocol: IUdpProtocol<UDPServerMessage>
    {
        public CustomerProtocol Protocols { get; set; }

        public UDPServerMessage Parse(ArraySegment<byte> buffer)
        {
            var bt = Protocols.Parse(buffer, out int readleng);
            return new UDPServerMessage(bt);
        }
    }
}
